package com.maiji.cloud.entities.shopingmall;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.util.List;

@NoArgsConstructor
@Data
@Accessors(chain=true)
@Table(name = "province_city")
public class ProvinceCity {

    @TableId(value = "uuId", type = IdType.AUTO)
    @Column(name = "name", type = MySqlTypeConstant.INT, length = 2)
    private Integer uuId;

    @Column(name = "name", type = MySqlTypeConstant.VARCHAR, length = 20)
    private String name;

    @Column(name = "pid", type = MySqlTypeConstant.INT, length = 2)
    private Integer pid;

    @TableField(exist = false)
    private List<ProvinceCity> childrenList;

}
